<template>
  <uni-popup ref="popupRef" border-radius="10px 10px 0 0">
    <view class="popup-box">
      <up-qrcode :size="200" :val="qrcode"></up-qrcode>
    </view>
  </uni-popup>
</template>
<script setup>

const props = defineProps({
  account: {
    type: String,
    default: ''
  }
})

const popupRef = ref()
const qrcode = computed(()=>{
  return `https://tongwang.cc/tongwang/#/pages/tabBar/home/index?account=${props.account}`
})
const open = () => {
  console.log('qrcode',qrcode.value)
  popupRef.value.open()
}
const close = () => {
  popupRef.value.close()
}

defineExpose({
  open,
  close
})

</script>
<style scoped lang="scss">
.popup-box {
  padding: 20rpx;
  background-color: #fff;
  border-radius: 24rpx;
}
</style>